package org.xzx.shop_api.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.xzx.shop_api.entity.Address;
import org.xzx.shop_api.utils.JsonResult;

import java.util.List;

@Mapper
public interface AddressMapper {
    int insert(Address address);
    List<Address> selectByUserId(@Param("userId") int userId);
    Address selectById(@Param("id") int id);
    int update(Address address);
    int delete(@Param("id") int id);
    void cancelOtherDefault(@Param("userId") int userId);
    List<Address> selectWithUser(@Param("userId") int userId);
}
